#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
#endregion

namespace Tomahawk.Runtime.Audio
{
    /// <summary>
    /// 
    /// </summary>
    public class AudioPackage
    {

        private AudioEngine audioEngine;
        private WaveBank waveBank;
        private SoundBank soundBank;

        /// <summary>
        /// Load the package
        /// </summary>
        public void Load(string audioProject, string waveBank, string soundBank)
        {
            this.audioEngine = new AudioEngine(audioProject);
            this.waveBank = new WaveBank(audioEngine, waveBank);
            this.soundBank = new SoundBank(audioEngine, soundBank);
        }

        /// <summary>
        /// Unload the package
        /// </summary>
        internal void Unload()
        {
            this.soundBank.Dispose();
            this.waveBank.Dispose();
            this.audioEngine.Dispose();
        }

        /// <summary>
        /// Get a cue from the soundbank
        /// </summary>
        public Cue GetCue(string name)
        {
            return this.soundBank.GetCue(name);
        }

        /// <summary>
        /// Directly play a cue from the soundbank
        /// </summary>
        public void PlayCue(string name)
        {
            this.soundBank.PlayCue(name);
        }

    }

}


